<div ng-controller="WelfareAssociationController" class="main">
    <div class="container">
        <div class="special">
            <div class="breadcrumb specifyyy">
                <a class="special" href="#">本期专场</a>

            </div>
            <ul class="fulizhuanchang">

            </ul>
        </div>
    </div>
</div>
<script type="text/html" id="zhuanChang1">
    <li>
        <div class="li-left">
            <a class="li-tu">
                <img  title="{{img_left_title}} "
                      src="{{img_left_1}}">
            </a>
        </div>
        <div class="li-center">
            <div class="li-center-top">距离结束还剩</div>
            <div class="li-center-bottom">
                <span>18</span>小时
            </div>
        </div>
        <div class="li-right">
            <a>
                <img  title="{{img_right_title}}"
                      src="{{img_right}}">
            </a>
        </div>
    </li>
</script>
<script type="text/html" id="zhuanChang2">
    <li>
        <div class="li-left">
            <a class="li-tu">
                <img  title="{{img_left_title}} "
                src="{{img_left_1}}">
            </a>
            <a class="li-tu">
                <img  title="{{img_left_title}} "
                      src="{{img_left_2}}">
            </a>
            <a class="li-tu">
                <img  title="{{img_left_title}} "
                      src="{{img_left_3}}">
            </a>
            <a class="li-tu">
                <img  title="{{img_left_title}} "
                      src="{{img_left_4}}">
            </a>
        </div>
        <div class="li-center">
            <div class="li-center-top">距离结束还剩</div>
            <div class="li-center-bottom">
                <span>18</span>小时
            </div>
        </div>
        <div class="li-right">
            <a>
                <img  title="{{img_right_title}}"
                        src="{{img_right}}">
            </a>
        </div>
    </li>
</script>
<script language=javascript type="text/javascript">
    $.ajax({
        url: "json/zhuanchang1.json",
        method: "get",
        dataType: "json",
        success:function (data) {
            $(template("zhuanChang1", data.tops)).appendTo(".fulizhuanchang");
            $.each(data.array,function (i,value) {
                $(template("zhuanChang2", value)).appendTo(".fulizhuanchang");
            })
        }
    })
    setTimeout(xiabiaos,100);//延迟100毫秒执行xiaobiaos（）函数

//    点击获得当前下标
function xiabiaos() {
    $(document).ready(function() {
        var $zhuanchang = $(".fulizhuanchang li");
        $zhuanchang.on("click",function () {
            zhuanchangIndex = $zhuanchang.index($(this)[0]);
            window.location.href='#/today';  //页面跳转
            $("body").scrollTop(0);
            $(document).unbind("click"); //解除click事件
        });
    });
}
</script>
